Revert "API: Add API to set style properties to be inherit"
authorBenjamin Otte <otte@redhat.com>
Tue, 31 May 2011 10:42:30 +0000 (12:42 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 2 Jun 2011 00:03:52 +0000 (02:03 +0200)
Inheritance is now done using style property flags, so thereis no ned
anymore to clobber the pspec flags namespace.
Also, there is no need to expose this functionality in the public API
without exposing more of the styleproperty API.

This essentially reverts commit 9bfd3d2eec96cba146fc9f5e1ab972584672e3d5.

docs/reference/gtk/gtk3-sections.txt
gtk/gtk.symbols
gtk/gtkstyleproperties.c
gtk/gtkstyleproperties.h
gtk/gtkstyleproperty.c

index 56e9ade89630330c505b5fdeed122dc7e7f5a65c..a84c0b34e8401ada80fc832f2cb19bb58eec0b66 100644 (file)
@@ -5492,8 +5492,6 @@ gtk_style_properties_map_color
 gtk_style_properties_merge
 gtk_style_properties_new
 GtkStylePropertyParser
-gtk_style_param_set_inherit
-gtk_style_param_get_inherit
 gtk_style_properties_register_property
 gtk_style_properties_set
 gtk_style_properties_set_property
index 90eae718e5355cd3fba1bfa8fee51e913e45a42b..3f15bf5218d6b44944a16660547a2dbc0adc9ca7 100644 (file)
@@ -2520,8 +2520,6 @@ gtk_style_has_context
 gtk_style_lookup_color
 gtk_style_lookup_icon_set
 gtk_style_new
-gtk_style_param_get_inherit
-gtk_style_param_set_inherit
 gtk_style_properties_clear
 gtk_style_properties_get
 gtk_style_properties_get_property
index 4f9a4bb112d15b187b07a5ba0f1a1d6946d16d40..45fdfbd8d50838fffcd76046033bc841f4420591 100644 (file)
@@ -361,54 +361,6 @@ gtk_style_properties_lookup_property (const gchar             *property_name,
   return found;
 }
 
-/* GParamSpec functionality */
-
-enum {
-  GTK_STYLE_PARAM_INHERIT = 1 << G_PARAM_USER_SHIFT
-};
-
-/**
- * gtk_style_param_set_inherit:
- * @pspec: A style param
- * @inherit: whether the @pspec value should be inherited
- *
- * Sets whether a param spec installed with function such as
- * gtk_style_properties_register_property() or
- * gtk_widget_class_install_style_property() should inherit their
- * value from the parent widget if it is not set instead of using
- * the default value of @pspec. See the
- * <ulink url="http://www.w3.org/TR/CSS21/cascade.html#inheritance">
- * CSS specification's description of inheritance</ulink> for a
- * longer description of this concept.
- *
- * By default, param specs do not inherit their value.
- **/
-void
-gtk_style_param_set_inherit (GParamSpec *pspec,
-                             gboolean    inherit)
-{
-  if (inherit)
-    pspec->flags |= GTK_STYLE_PARAM_INHERIT;
-  else
-    pspec->flags &= ~GTK_STYLE_PARAM_INHERIT;
-}
-
-/**
- * gtk_style_param_get_inherit:
- * @pspec: a style param
- *
- * Checks if the value of this param should be inherited from the parent
- * #GtkWidget instead of using the default value when it has not been
- * specified. See gtk_style_param_set_inherit() for more details.
- *
- * Returns: %TRUE if the param should inherit its value
- **/
-gboolean
-gtk_style_param_get_inherit (GParamSpec *pspec)
-{
-  return (pspec->flags & GTK_STYLE_PARAM_INHERIT) ? TRUE : FALSE;
-}
-
 /* GtkStyleProperties methods */
 
 /**
index a38905e050bfc25535e08a67833b881fcbc7b208..0cc478892b56e443c84bd56b11e1d2dd4c8ed99e 100644 (file)
@@ -66,10 +66,6 @@ typedef gboolean (* GtkStylePropertyParser) (const gchar  *string,
 
 GType gtk_style_properties_get_type (void) G_GNUC_CONST;
 
-void     gtk_style_param_set_inherit            (GParamSpec             *pspec,
-                                                 gboolean                inherit);
-gboolean gtk_style_param_get_inherit            (GParamSpec             *pspec);
-
 /* Functions to register style properties */
 void     gtk_style_properties_register_property (GtkStylePropertyParser  parse_func,
                                                  GParamSpec             *pspec);
index c5ddb4b46b076e375e2a6c8cf299a92451573876..6458c83f8fed1380102a6cceb5b38d45006d63b6 100644 (file)
@@ -1946,8 +1946,7 @@ _gtk_style_property_is_inherit (const GtkStyleProperty *property)
 {
   g_return_val_if_fail (property != NULL, FALSE);
 
-  return property->flags & GTK_STYLE_PROPERTY_INHERIT ||
-    gtk_style_param_get_inherit (property->pspec);
+  return property->flags & GTK_STYLE_PROPERTY_INHERIT ? TRUE : FALSE;
 }
 
 gboolean